<template>
  <div class="input">
    <div v-for="(item, i) in name" :key="i" class="input-item">
      <input
        type="radio"
        :name="name[0]"
        :value="item"
        v-model="param"
        @change="select"
      /><font>{{ item }}</font>
    </div>
  </div>
</template>

<script>
import font from "@/components/Editor/Common/Font";
export default {
  components: {
    font,
  },
  props: {
    name: [],
  },
  data() {
    return {
      param: this.name[0],
    };
  },
  methods: {
    select() {
      this.$emit("select", this.param);
    },
    getVal(){
      return this.param;
    }
  },
};
</script>

<style scoped>
.input {
  width: 100%;
  height: 40px;
  line-height: 40px;
  display: flex;
}
.input-item {
  display: flex;
  margin-right: 30px;
}
input {
  cursor: pointer;
}
.font {
  padding-left: 10px;
}
</style>
